package com.share.lottery.activity.caibotools;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;

import com.share.lottery.R;
import com.share.lottery.activity.JcMainActivtiy;
import com.share.lottery.base.BaseActivity;

/**
 * @author py
 *倍投助手
 */
public class BtzsActivity extends BaseActivity {

	private EditText edTrzs;//
	private EditText edZhqs;
	private EditText edQsbs;//起始倍数
	private EditText edDzjj;//单注奖金
	private EditText edSyl;//收益率
	private Button btnJs;//计算
	protected void onCreate(Bundle savedInstanceState) {
	
		super.onCreate(savedInstanceState);
		setContentView(R.layout.btzs_main);
		init();
		
	}
	
	
	public void findView() {
		edTrzs = (EditText) findViewById(R.id.ed_trzs);
		edZhqs = (EditText) findViewById(R.id.ed_zhqs);
		edQsbs = (EditText) findViewById(R.id.ed_qsbs);
		edDzjj = (EditText) findViewById(R.id.ed_dzjj);
		edSyl = (EditText) findViewById(R.id.ed_syl);
		btnJs = (Button) findViewById(R.id.btn_js);

	}


	public void getData() {
	

	}


	private TextView titleTv;
	public void initTitle() {
		ImageButton titleLeftImg = (ImageButton) findViewById(R.id.title_left_img);
		ImageButton titleRightImg = (ImageButton) findViewById(R.id.title_right_img);
		titleTv = (TextView) findViewById(R.id.title_tv_center);
		titleLeftImg.setOnClickListener(new OnClickListener() {
			

			public void onClick(View arg0) {
				finish();
				
			}
		});
		titleLeftImg.setImageResource(R.drawable.back);
		titleTv.setText("倍投助手");
		titleRightImg.setVisibility(View.VISIBLE);
		titleRightImg.setImageResource(R.drawable.home);
		titleRightImg.setOnClickListener(new OnClickListener() {
			
		
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(getApplicationContext(), JcMainActivtiy.class);
				startActivity(intent);
				finish();
				
			}
		});
		}


	public void setData() {
		

	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_js://计算
			jsAndNext();
			break;

		default:
			break;
		}
	}

	/**
	 * 计算结果并跳转
	 */
	private void jsAndNext() {
		Intent intent = new Intent();
		intent.setClass(getApplicationContext(), SeachGridFragment.class);
		startActivity(intent);
		
	}


	public void setonCliker() {
		btnJs.setOnClickListener(this);

	}

}
